PERF_FLAGS=-DPERF_SCAN

CC=g++ #icpc
FLAGS=-fopenmp -g -Wall $(PERF_FLAGS) -O3

MIC_CC=icpc
MIC_FLAGS=-fopenmp -g -Wall -O3 -mmic -DIS_MIC $(PERF_FLAGS)

HEADER= \
	Solver/Solver.h \
	Solver/DijstraHeap.h Solver/AdjustDij_NoGlobalSync.h \
	Solver/AdjustDij_NoLock.h \
	Test/TestCase.h Test/TestPerf.h\
	Utils/CycleTimer.h Utils/Dataset.h Utils/Graph.h Utils/Utils.h Utils/Queue.h \
	Utils/ColorUtils.h
HEADER_SRC= Utils/Graph.cpp Utils/ColorUtils.cpp
SRC= Main.cpp $(HEADER)
SRC_COLOR= Main_Color.cpp $(HEADER)

all: Solver

Solver: $(SRC)
	$(CC) Main.cpp $(HEADER_SRC) -o main $(FLAGS)

Color: $(SRC_COLOR)
	$(CC) Main_Color.cpp $(HEADER_SRC) -o main $(FLAGS)

Mic: Mic-Solver

Mic-Solver: $(SRC)
	$(MIC_CC) Main.cpp $(HEADER_SRC) -o main $(MIC_FLAGS)

clean:
	rm -f main
